home *** CD-ROM | disk | FTP | other *** search
/ Champak 140 / (Vol 140) Sep 19 2011.iso / Games / top_that_pizza.swf / scripts / DefineButton2_630 / BUTTONCONDACTION on(release).as
Text File  |  2011-09-19  |  1KB  |  39 lines

  1. on(release){
  2.    scoresend = new LoadVars();
  3.    _root.name = namefield.text;
  4.    _root.email = emailfield.text;
  5.    scoresend.name = _root.name;
  6.    scoresend.email = _root.email;
  7.    scoresend.score = _root.score;
  8.    scoresend.level = _root.level;
  9.    if(tickbox._currentframe == 1)
  10.    {
  11.       scoresend.optin = 0;
  12.    }
  13.    else
  14.    {
  15.       scoresend.optin = 1;
  16.    }
  17.    scoreget = new LoadVars();
  18.    scoreget.onLoad = function()
  19.    {
  20.       if(scoreget.highscore_status == "true")
  21.       {
  22.          _root.comboboxs._visible = false;
  23.          _parent.gotoAndStop("highscores");
  24.       }
  25.    };
  26.    scoresend.topping1 = _root.comboboxs.items1.getValue();
  27.    scoresend.topping2 = _root.comboboxs.items2.getValue();
  28.    scoresend.topping3 = _root.comboboxs.items3.getValue();
  29.    this.tickbox = tickbox._currentframe - 1;
  30.    if(_root.name != "" && _root.email != "" && scoresend.topping1 != "" && scoresend.topping2 != "" && scoresend.topping3 != "")
  31.    {
  32.       scoresend.sendAndLoad("highscore_save.php",scoreget,"POST");
  33.       var trackvar = new LoadVars();
  34.       trackvar.section = "submits score";
  35.       var rtrackvar = new LoadVars();
  36.       trackvar.sendAndLoad("tracking.php",rtrackvar,"POST");
  37.    }
  38. }
  39.